package com.papercutting.platform.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
 * 用户学习记录实体
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("pc_user_study")
public class UserStudy extends BaseEntity {
    
    /**
     * 用户ID
     */
    @TableField("user_id")
    private Long userId;

    /**
     * 教程ID
     */
    @TableField("tutorial_id")
    private Long tutorialId;

    /**
     * 学习进度(百分比)
     */
    @TableField("progress")
    private Integer progress = 0;

    /**
     * 当前学习步骤
     */
    @TableField("current_step")
    private Integer currentStep = 1;

    /**
     * 总步骤数
     */
    @TableField("total_steps")
    private Integer totalSteps = 0;

    /**
     * 学习时长(秒)
     */
    @TableField("study_duration")
    private Integer studyDuration = 0;

    /**
     * 是否完成
     */
    @TableField("is_completed")
    private Boolean isCompleted = false;

    /**
     * 完成时间
     */
    @TableField("completed_time")
    private LocalDateTime completedTime;

    /**
     * 最后学习时间
     */
    @TableField("last_study_time")
    private LocalDateTime lastStudyTime;
}